#ifndef PLAYER_H
#define PLAYER_H

#include <SFML/Graphics.hpp>
#include <SFML/Graphics/Rect.hpp>
#include <iostream>

#include "globals.h"

class Player
{
public:
	Player( std::string image, float left, float top );
	Player( const Player &player );
	~Player();
	void setPosition( float left, float top );
	sf::Rect<float> getRect();
	sf::Sprite getSprite();
	void rotateImage( unsigned int direction );
	void setRect( float top, float bottom, float left, float right );
	void setInput( sf::Key::Code upKey, sf::Key::Code downKey, sf::Key::Code leftKey, sf::Key::Code rightKey );
	void input( const sf::Input &input );
private:
	std::string imageName;
	sf::Image image;
	sf::Sprite sprite;
	sf::Rect<float> rect;
	sf::Key::Code downInput;
	sf::Key::Code upInput;
	sf::Key::Code leftInput;
	sf::Key::Code rightInput;
};

/// this is a player helper function which
/// helps rotates through the players
/// different sprites.
unsigned int rotateImage();

#endif